<!DOCTYPE html>
<html class="login-bg">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><#:C('sitename')#>--代理商登录</title>
	<meta name="keywords" content="<#:C('keyword')#>"/>
	<meta name="description" content="<#:C('content')#>"/>
    
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	
    <!-- bootstrap -->
    <link href="<#$Theme['P']['root']#>/bootadmin/css/bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="<#$Theme['P']['root']#>/bootadmin/css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
    <link href="<#$Theme['P']['root']#>/bootadmin/css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

    <!-- global styles -->
    <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/bootadmin/css/layout.css" />
    <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/bootadmin/css/elements.css" />
    <link rel="stylesheet" type="text/css" href="<#$Theme['P']['root']#>/bootadmin/css/icons.css" />
    <!-- libraries -->
    <link href="<#$Theme['P']['root']#>/bootadmin/css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
    <!-- this page specific styles -->
    <link rel="stylesheet" href="<#$Theme['P']['root']#>/bootadmin/css/compiled/signin.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/AUI/Public/bootadmin/css/compiled/signin.css" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/AUI/Public/bootadmin/css/layout.css" />
    <!--[if lt IE 9]>
    <script src="/AUI/Public/js/html5.js"></script>
    <![endif]-->
</head>

<body style="background-color:#0056a9;background-image: url(/AUI/Public/images/gl.jpg); background-repeat: no-repeat; background-position: center top; text-align:center">
<div class="w800">
     <div class="row-fluid login-wrapper" style="text-align:left">
        <div class="span4 box" style="text-align:left;margin-left:10px;">
            <div class="content-wrap">
              <div class="alert " style="display: none;">
				  <span id="alertmsg"></span>
			  </div>
                <input class="span12" type="text" name="txt_user" id="txt_user" placeholder="登录帐号" style="font-size: 15px;   height: 40px;
      margin-bottom: 18px;      border-color: #b2bfc7;      padding-left: 12px;"/><br>
                <input class="span12" type="password" name="password" id="password" placeholder="密码" style="font-size: 15px;   height: 40px;
      margin-bottom: 18px;      border-color: #b2bfc7;      padding-left: 12px;"/>
                <br>
                <a class="btn-glow primary login" href="javascript:void(0);" id="btn_log">登录</a>
            </div>
        </div>
        <div class="span4 no-account"> </div>
    </div>
</div>
     <div style="display: none">
          <script type="text/javascript">
            var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
            document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fff6b82e1b2c7607791dcac12a7ab8ce1' type='text/javascript'%3E%3C/script%3E"));
          </script>
    </div>
	<!-- scripts -->
    <script src="<#$Theme['P']['js']#>/jquery.js"></script>
    <script src="<#$Theme['P']['root']#>/bootadmin/js/bootstrap.min.js"></script>
    <script src="<#$Theme['P']['root']#>/bootadmin/js/theme.js"></script>
        <script src="<#$Theme['P']['root']#>/bootadmin/js/common.js"></script>
    <!-- pre load bg imgs -->
    <script type="text/javascript">
    document.onkeydown=function(event){
  	  e = event ? event :(window.event ? window.event : null);
  	  if(e.keyCode==13){
  	   //执行的方法
  	  	$('#btn_log').click();
  	  }
  	 }
        $(function () {
            // bg switcher
            var $btns = $(".bg-switch .bg");
            $btns.click(function (e) {
                e.preventDefault();
                $btns.removeClass("active");
                $(this).addClass("active");
                var bg = $(this).data("img");
                $("html").css("background-image", "url('<#$Theme['P']['root']#>/bootadmin/img/bgs/" + bg + "')");
            });
            $('#btn_log').bind('click',function(){
				var u=$('#txt_user').val();
				var p=$('#password').val();
				 if (u == "") {
					 AlertTips( "请输入帐号",  1000);
				        return false;
				 }
				  if (p == "") {
					
					  AlertTips( "请输入密码",1000);
				        return false;
				  }
				  $.ajax({
					  	url: "<#:U('index/index/doagentlog')#>",
				        type: "post",
						data:{
							'user':u,
							'password':p,
							'__hash__':$('input[name="__hash__"]').val()
							},
						dataType:'json',
						error:function(){AlertTips("服务器忙，请稍候再试",1500);},
						success:function(data){
								if(data.error==0){
									location.href=data.url;
								}else{
									AlertTips(data.msg, 1500);
								}
						}
					  });
				});
        });
    </script>
</body>
</html>